package com.nuc.lsp2;

/**
 * Time    : 2023/3/26 10:55
 * Author  : 王摇摆
 * FileName: Main.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class Main {
    public static void main(String[] args) {
        Swallon swallon = new Swallon();
        BrownKiwi brownKiwi = new BrownKiwi();

        swallon.setFlySpeed(120);
        brownKiwi.setRunSpeed(120);

        try {
            System.out.println("如果奔跑300公里");
            System.out.println("燕子需要飞行" + swallon.getFlyTime(300) + "小时");
            System.out.println("几维鸟需要奔跑" + brownKiwi.getRunTime(300) + "小时");

        } catch (Exception error) {
            System.out.println(error);
        }
    }
}
